


If you see similar errors

ERROR: modpost: "somefunc" [/path/to/the/module/module.ko] undefined!

means some options are not enabled in the kernel configuration.
By the name of the function, you can guess what needs to be included 
in the config. For example, the error log can be like this:

ERROR: modpost: "vb2_ioctl_reqbufs" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "video_device_release_empty" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "v4l2_device_unregister" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "v4l2_ctrl_handler_free" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_fop_poll" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ioctl_streamon" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ops_wait_prepare" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "__video_register_device" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "v4l2_device_register" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_fop_read" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_vmalloc_memops" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_fop_mmap" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ioctl_qbuf" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "video_unregister_device" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_plane_vaddr" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_buffer_done" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "v4l2_ctrl_new_custom" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ioctl_create_bufs" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ioctl_dqbuf" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_fop_release" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "video_devdata" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "v4l2_ctrl_handler_setup" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "v4l2_fh_open" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ioctl_querybuf" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "v4l2_ctrl_handler_init_class" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ops_wait_finish" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ioctl_expbuf" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_ioctl_streamoff" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "video_ioctl2" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!
ERROR: modpost: "vb2_queue_init" [/home/cpu/ktemp/r5u870v2/r5u870v2.ko] undefined!

vb2 means videobuf2. Also, by the purpose of the module (in our case, this is a 
webcam driver), you can guess which options need to be enabled in the kernel. 
Thus, the following options must be enabled in the kernel (the list may be 
different for different kernel versions): 

CONFIG_MEDIA_SUPPORT
CONFIG_MEDIA_CAMERA_SUPPORT

Please note that you cannot directly enable some options such as:

CONFIG_VIDEOBUF2_CORE
CONFIG_VIDEOBUF2_VMALLOC
CONFIG_VIDEOBUF2_V4L2

These options are enabled depending on other options in the kernel. 
For example, you can enable the following option:

CONFIG_TOUCHSCREEN_ATMEL_MXT_T37

After enabling this option, the videobuf2 options will be enabled by their 
own dependencies. If this is not the case, then read the built-in help in 
menuconfig, see what depends on these options and enable them. I cannot
foresee all situations in advance. The instructions described here are just
an example of the logic that should be followed to resolve such errors.





















